// pages/my/my.js
Page({
  data: {
    userInfo: {
      avatarUrl: '/pages/images/wd/head.png',
      nickName: '用户6026',
      level: 'SVIP会员',
      points: 1234,
      membership: '黄金会员',
      lastLoginTime: '',
      location: '四川省 广安市 广安区 ',
    },
    orderCount: {
      pendingPayment:2,
      pendingDelivery: 5,
      completed: 6,
    }
  },

  onLoad: function (options) {
    // 页面加载时的逻辑，比如更新最后登录时间
    this.updateLastLoginTime()
  },
  updateLastLoginTime: function () {
    const currentTime = new Date();
    const timeString = currentTime.toLocaleString(); // 转换为本地时间格式
    this.setData({
      lastLoginTime: timeString,
    });
  },

  navigateToAboutUs: function () {
    wx.navigateTo({ url: '/pages/AboutUs/AboutUs' });
  },
});